using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Youshow.Ace.Domain.Models;

namespace BlogSystem.Domain.NewsInfo
{
    public class Reply : BaseModel<int>
    {
        [Comment("用户ID")]
        [Column("user_id")]
        public int UserId { get; set; }

        [Comment("昵称")]
        [Column("nick_name")]
        public string NickName { get; set; }

        [Comment("评论标题")]
        [Column("reply_title")]
        public int? ReplyTitle { get; set; }

        [Comment("评论内容")]
        [Column("reply_content")]
        public string ReplyContent { get; set; }

        [Comment("文章ID")]
        [Column("news_id")]
        public int NewsId { get; set; }

        [Comment("评论时间")]
        [Column("reply_date")]
        public DateTime ReplyDate { get; set; }

        public void InitReply()
        {
            this.ReplyDate = DateTime.Now;
        }
    }
}